3.0.4 RC3 (mingw 3.4.5)-2
Benjamin Lindner
lindnerben at gmx.net
Tue Mar 3 12:49:52 CST 2009
John W. Eaton wrote:
> On 30-Jan-2009, Benjamin Lindner wrote:
>
> | To work around it in octave we need to rethink octave's way to save
> | anonymous function handles in ascii format.
> | I have tried something for in the development branch, which allows this
> | test to pass, but it means a small but significant change in the format
> | of saving anonymous function handles. This breaks backwards
> | compatibility, so I'm not really happy about my approach.
>
> We can open text files for reading in binary mode. It just means that
> we have to handle the CRLF, CR, and LF line endings ourselves. We
> already do that (more or less) for .m files. But it would maybe be a
> good idea to come up with a unified way of doing it for all of Octave.
>
I have put some thought into this problem and have changed the behaviour
of reading ascii mode data by doing the following
*) files get always opened in binary mode when loading data (saving to
ascii is still done in text mode)
*) walked through the load_ascii( ) method of the various octave_value
derived classes and moved all newline/cr/lf related code into common
functions
*) created ls-ascii-helper.h and ls-ascii-helper.cc and stored the
common functions there
With this, I get rid of the failing test in ov-fcn-handle.cc on mingw. I
have no additional failed tests. Saving and loading in "-text" format
seems to work, I have not encountered problems yet.
I don't have access to matlab, so I could not check what happens with
data files in matlab's text format. I'd appreciate cross-checks.
benjamin
-------------- next part --------------
An embedded and charset-unspecified text was scrubbed...
Name: fix-crlf.patch
Url: https://www-old.cae.wisc.edu/pipermail/octave-maintainers/attachments/20090303/9b6d10ce/attachment.ksh
More information about the Octave-maintainers
mailing list