Mercurial > hg > octave-nkf
changeset 6905:aee959a21c4b
[project @ 2007-09-17 16:00:30 by jwe]
author | jwe |
---|---|
date | Mon, 17 Sep 2007 16:00:30 +0000 |
parents | 1758d3d3d266 |
children | c5118619023e |
files | src/ChangeLog src/file-io.cc |
diffstat | 2 files changed, 7 insertions(+), 3 deletions(-) [+] |
line wrap: on
line diff
--- a/src/ChangeLog +++ b/src/ChangeLog @@ -1,3 +1,7 @@ +2007-09-17 John W. Eaton <jwe@octave.org> + + * file-io.cc (do_stream_open): Use binary mode by default. + 2007-09-14 Shai Ayal <shaiay@users.sourceforge.net> * genprop.awk: Handle "a" modifier. @@ -1074,7 +1078,7 @@ 2007-03-13 John W. Eaton <jwe@octave.org> * file-io.cc (do_stream_open): Use binary mode if 't' is not - specified in mode, but don't add 'b' if it is already present. + specified in mode, but don't add 'b' if it is already present. 2007-03-09 David Bateman <dbateman@free.fr>
--- a/src/file-io.cc +++ b/src/file-io.cc @@ -414,7 +414,6 @@ } } -#if defined (HAVE_ZLIB) std::string tmode = mode; // Use binary mode if 't' is not specified, but don't add @@ -426,6 +425,7 @@ if (bpos == NPOS && tpos == NPOS) tmode += 'b'; +#if defined (HAVE_ZLIB) size_t pos = tmode.find ('z'); if (pos != NPOS) @@ -445,7 +445,7 @@ else #endif { - FILE *fptr = ::fopen (fname.c_str (), mode.c_str ()); + FILE *fptr = ::fopen (fname.c_str (), tmode.c_str ()); retval = octave_stdiostream::create (fname, fptr, md, flt_fmt);