Mercurial > hg > octave-nkf
changeset 5015:6d481b6e349e
[project @ 2004-09-22 02:18:13 by jwe]
author | jwe |
---|---|
date | Wed, 22 Sep 2004 02:18:13 +0000 |
parents | fd5871c5f85b |
children | bdbee5282954 |
files | liboctave/ChangeLog liboctave/mach-info.cc liboctave/mach-info.h src/ChangeLog src/oct-fstrm.h src/oct-iostrm.h src/oct-prcstrm.h src/oct-stdstrm.h src/oct-stream.h src/oct-strstrm.h |
diffstat | 10 files changed, 71 insertions(+), 36 deletions(-) [+] |
line wrap: on
line diff
--- a/liboctave/ChangeLog +++ b/liboctave/ChangeLog @@ -1,3 +1,10 @@ +2004-09-21 John W. Eaton <jwe@octave.org> + + * mach-info.h (octave_mach_info::flt_fmt_native): Delete. + * mach-info.cc (octave_mach_info::string_to_float_format): + For "native", set actual native format. + (octave_mach_info::float_format_as_string): Delete flt_fmt_native case. + 2004-09-17 David Bateman <dbateman@free.fr> * CmplxSCHUR.cc (CmplxSCHUR::init): New arg, calc_unitary to make the
--- a/liboctave/mach-info.cc +++ b/liboctave/mach-info.cc @@ -201,7 +201,7 @@ oct_mach_info::float_format retval = oct_mach_info::flt_fmt_unknown; if (s == "native" || s == "n") - retval = oct_mach_info::flt_fmt_native; + retval = oct_mach_info::native_float_format (); else if (s == "ieee-be" || s == "b") retval = oct_mach_info::flt_fmt_ieee_big_endian; else if (s == "ieee-le" || s == "l") @@ -228,10 +228,6 @@ switch (flt_fmt) { - case flt_fmt_native: - retval = "native"; - break; - case flt_fmt_ieee_big_endian: retval = "ieee_big_endian"; break;
--- a/liboctave/mach-info.h +++ b/liboctave/mach-info.h @@ -36,7 +36,6 @@ enum float_format { - flt_fmt_native, flt_fmt_unknown, flt_fmt_ieee_little_endian, flt_fmt_ieee_big_endian,
--- a/src/ChangeLog +++ b/src/ChangeLog @@ -1,3 +1,24 @@ +2004-09-21 John W. Eaton <jwe@octave.org> + + * oct-fstrm.h (octave_fstream::octave_fstream, + octave_fstream::create): Set default float format to actual native + format, not flt_fmt_native. + * oct-iostrm.h (octave_base_iostream::octave_base_iostream, + octave_istream::octave_istream, octave_ostream::octave_ostream): + Likewise. + * oct-prcstrm.h (octave_iprocstream::octave_iprocstream, + octave_oprocstream::octave_oprocstream, + octave_iprocstream::create, octave_oprocstream::create): + Likewise. + * oct-stdstrm.h (octave_stdiostream::octave_stdiostream, + octave_stdiostream::create): + Likewise. + * oct-stream.h (octave_base_stream::octave_base_stream): + Likewise. + * oct-strstrm.h (octave_base_strstream::octave_base_strstream, + octave_istrstream::octave_istrstream, octave_istrstream::create): + Likewise. + 2004-09-21 David Bateman <dbateman@free.fr> * data.cc (Freshape): Allow a single empty dimension argument
--- a/src/oct-fstrm.h +++ b/src/oct-fstrm.h @@ -35,13 +35,14 @@ octave_fstream (const std::string& nm_arg, std::ios::openmode arg_md = std::ios::in|std::ios::out, - oct_mach_info::float_format flt_fmt = - oct_mach_info::flt_fmt_native); + oct_mach_info::float_format flt_fmt + = oct_mach_info::native_float_format ()); static octave_stream create (const std::string& nm_arg, std::ios::openmode arg_md = std::ios::in|std::ios::out, - oct_mach_info::float_format flt_fmt = oct_mach_info::flt_fmt_native); + oct_mach_info::float_format flt_fmt + = oct_mach_info::native_float_format ()); // Position a stream at OFFSET relative to ORIGIN.
--- a/src/oct-iostrm.h +++ b/src/oct-iostrm.h @@ -34,8 +34,8 @@ octave_base_iostream (const std::string& n = std::string (), std::ios::openmode m = std::ios::in|std::ios::out, - oct_mach_info::float_format ff = - oct_mach_info::flt_fmt_native) + oct_mach_info::float_format ff + = oct_mach_info::native_float_format ()) : octave_base_stream (m, ff), nm (n) { } // Position a stream at OFFSET relative to ORIGIN. @@ -79,8 +79,10 @@ public: octave_istream (std::istream *arg = 0, const std::string& n = std::string ()) - : octave_base_iostream (n, std::ios::in, oct_mach_info::flt_fmt_native), - is (arg) { } + : octave_base_iostream (n, std::ios::in, + oct_mach_info::native_float_format ()), + is (arg) + { } static octave_stream create (std::istream *arg = 0, const std::string& n = std::string ()); @@ -116,8 +118,10 @@ public: octave_ostream (std::ostream *arg, const std::string& n = std::string ()) - : octave_base_iostream (n, std::ios::out, oct_mach_info::flt_fmt_native), - os (arg) { } + : octave_base_iostream (n, std::ios::out, + oct_mach_info::native_float_format ()), + os (arg) + { } static octave_stream create (std::ostream *arg, const std::string& n = std::string ());
--- a/src/oct-prcstrm.h +++ b/src/oct-prcstrm.h @@ -35,12 +35,13 @@ octave_iprocstream (const std::string& n, std::ios::openmode arg_md = std::ios::in, - oct_mach_info::float_format flt_fmt = - oct_mach_info::flt_fmt_native); + oct_mach_info::float_format flt_fmt + = oct_mach_info::native_float_format ()); static octave_stream create (const std::string& n, std::ios::openmode arg_md = std::ios::in, - oct_mach_info::float_format flt_fmt = oct_mach_info::flt_fmt_native); + oct_mach_info::float_format flt_fmt + = oct_mach_info::native_float_format ()); protected: @@ -62,12 +63,13 @@ octave_oprocstream (const std::string& n, std::ios::openmode arg_md = std::ios::out, - oct_mach_info::float_format flt_fmt = - oct_mach_info::flt_fmt_native); + oct_mach_info::float_format flt_fmt + = oct_mach_info::native_float_format ()); static octave_stream create (const std::string& n, std::ios::openmode arg_md = std::ios::out, - oct_mach_info::float_format flt_fmt = oct_mach_info::flt_fmt_native); + oct_mach_info::float_format flt_fmt + = oct_mach_info::native_float_format ()); protected:
--- a/src/oct-stdstrm.h +++ b/src/oct-stdstrm.h @@ -33,8 +33,8 @@ octave_stdiostream (const std::string& n, FILE *f = 0, std::ios::openmode m = std::ios::in|std::ios::out, - oct_mach_info::float_format ff = - oct_mach_info::flt_fmt_native, + oct_mach_info::float_format ff + = oct_mach_info::native_float_format (), c_file_ptr_buf::close_fcn cf = c_file_ptr_buf::fclose) : octave_base_stream (m, ff), nm (n), md (m), s(0) { @@ -45,7 +45,8 @@ static octave_stream create (const std::string& n, FILE *f = 0, std::ios::openmode m = std::ios::in|std::ios::out, - oct_mach_info::float_format ff = oct_mach_info::flt_fmt_native, + oct_mach_info::float_format ff + = oct_mach_info::native_float_format (), c_file_ptr_buf::close_fcn cf = c_file_ptr_buf::fclose) { return octave_stream (new octave_stdiostream (n, f, m, ff, cf));
--- a/src/oct-stream.h +++ b/src/oct-stream.h @@ -323,7 +323,8 @@ public: octave_base_stream (std::ios::openmode arg_md = std::ios::in|std::ios::out, - oct_mach_info::float_format ff = oct_mach_info::flt_fmt_native) + oct_mach_info::float_format ff + = oct_mach_info::native_float_format ()) : count (0), md (arg_md), flt_fmt (ff), fail (false), open_state (true) { }
--- a/src/oct-strstrm.h +++ b/src/oct-strstrm.h @@ -35,8 +35,8 @@ public: octave_base_strstream (std::ios::openmode m = std::ios::out, - oct_mach_info::float_format ff = - oct_mach_info::flt_fmt_native) + oct_mach_info::float_format ff + = oct_mach_info::native_float_format ()) : octave_base_stream (m, ff) { } // Position a stream at OFFSET relative to ORIGIN. @@ -77,23 +77,25 @@ octave_istrstream (const char *data, std::ios::openmode arg_md = std::ios::out, - oct_mach_info::float_format ff = - oct_mach_info::flt_fmt_native) + oct_mach_info::float_format ff + = oct_mach_info::native_float_format ()) : octave_base_strstream (arg_md, ff), is (data) { } octave_istrstream (const std::string& data, std::ios::openmode arg_md = std::ios::out, - oct_mach_info::float_format ff = - oct_mach_info::flt_fmt_native) + oct_mach_info::float_format ff + = oct_mach_info::native_float_format ()) : octave_base_strstream (arg_md, ff), is (data.c_str ()) { } static octave_stream create (const char *data, std::ios::openmode arg_md = std::ios::out, - oct_mach_info::float_format ff = oct_mach_info::flt_fmt_native); + oct_mach_info::float_format ff + = oct_mach_info::native_float_format ()); static octave_stream create (const std::string& data, std::ios::openmode arg_md = std::ios::out, - oct_mach_info::float_format ff = oct_mach_info::flt_fmt_native); + oct_mach_info::float_format ff + = oct_mach_info::native_float_format ()); // Return non-zero if EOF has been reached on this stream. @@ -130,13 +132,14 @@ public: octave_ostrstream (std::ios::openmode arg_md = std::ios::out, - oct_mach_info::float_format ff = - oct_mach_info::flt_fmt_native) + oct_mach_info::float_format ff + = oct_mach_info::native_float_format ()) : octave_base_strstream (arg_md, ff) { } static octave_stream create (std::ios::openmode arg_md = std::ios::out, - oct_mach_info::float_format ff = oct_mach_info::flt_fmt_native); + oct_mach_info::float_format ff + = oct_mach_info::native_float_format ()); // Return non-zero if EOF has been reached on this stream.