Mercurial > hg > octave-nkf
changeset 4070:e0e95e9aad7b
[project @ 2002-09-27 15:26:28 by jwe]
author | jwe |
---|---|
date | Fri, 27 Sep 2002 15:26:29 +0000 |
parents | 593e213748b9 |
children | 3827a03c72f0 |
files | src/ChangeLog src/file-io.cc src/oct-stream.cc |
diffstat | 3 files changed, 11 insertions(+), 4 deletions(-) [+] |
line wrap: on
line diff
--- a/src/ChangeLog +++ b/src/ChangeLog @@ -1,3 +1,10 @@ +2002-09-27 John W. Eaton <jwe@bevo.che.wisc.edu> + + * file-io.cc (fopen_mode_to_ios_mode): Set ios::ate instead of + ios::app for "a+" mode. + * oct-stream.cc (octave_stream::mode_as_string): Recognize + ios::ate, not ios::app as "a+" mode. + 2002-09-26 Paul Kienzle <pkienzle@users.sf.net> * sysdep.cc: Include conio.h if it exists.
--- a/src/file-io.cc +++ b/src/file-io.cc @@ -114,7 +114,7 @@ else if (mode == "w+") retval = std::ios::in | std::ios::out | std::ios::trunc; else if (mode == "a+") - retval = std::ios::in | std::ios::out | std::ios::app; + retval = std::ios::in | std::ios::out | std::ios::ate; else if (mode == "rb") retval = std::ios::in | std::ios::binary; else if (mode == "wb") @@ -127,7 +127,7 @@ retval = (std::ios::in | std::ios::out | std::ios::trunc | std::ios::binary); else if (mode == "a+b") - retval = (std::ios::in | std::ios::out | std::ios::app + retval = (std::ios::in | std::ios::out | std::ios::ate | std::ios::binary); else ::error ("invalid mode specified");
--- a/src/oct-stream.cc +++ b/src/oct-stream.cc @@ -2835,7 +2835,7 @@ retval = "r+"; else if (in_mode == std::ios::in | std::ios::out | std::ios::trunc) retval = "w+"; - else if (in_mode == std::ios::in | std::ios::out | std::ios::app) + else if (in_mode == std::ios::in | std::ios::out | std::ios::ate) retval = "a+"; else if (in_mode == std::ios::in | std::ios::binary) retval = "rb"; @@ -2849,7 +2849,7 @@ else if (in_mode == std::ios::in | std::ios::out | std::ios::trunc | std::ios::binary) retval = "w+b"; - else if (in_mode == std::ios::in | std::ios::out | std::ios::app + else if (in_mode == std::ios::in | std::ios::out | std::ios::ate | std::ios::binary) retval = "a+b";