# HG changeset patch # User jwe # Date 1116382704 0 # Node ID df230b7df93c3253f320411c5251946abe56aabd # Parent ac4a7df431d4e929c66021026d05c899665533b7 [project @ 2005-05-18 02:18:24 by jwe] diff -r ac4a7df431d4 -r df230b7df93c src/ChangeLog --- a/src/ChangeLog Tue May 17 08:19:03 2005 +0000 +++ b/src/ChangeLog Wed May 18 02:18:24 2005 +0000 @@ -1,3 +1,29 @@ +2005-05-17 John W. Eaton + + * ov.cc (install_types): Don't call octave_stream::register_type. + * ov.h, ov.cc (octave_value::octave_value (const octave_stream&, + int): Delete constructor. + (octave_value::is_stream, octave_value::stream_value, + octave_value::stream_number): Delete functions. + * ov-base.h (octave_base_value::is_stream): Delete function. + * ov-base.h, ov-base.cc (octave_base_value::stream_value, + octave_base_value::stream_number): Delete functions. + * file-io.cc (Fisstream): Delete function. + * op-file.h, op-file.cc, OPERATORS/op-fil-sbm.cc, + OPERATORS/op-fil-scm.cc, OPERATORS/op-fil-sm.cc, + * OPERATORS/op-fil-b.cc, OPERATORS/op-fil-bm.cc, + OPERATORS/op-fil-cm.cc, OPERATORS/op-fil-cs.cc, + OPERATORS/op-fil-m.cc, OPERATORS/op-fil-s.cc, + OPERATORS/op-fil-lis.cc, OPERATORS/op-fil-rec.cc, + OPERATORS/op-fil-str.cc: Delete files. + * Makefile.in (OP_XSRC, SPARSE_OP_XSRC): Delete op-fil-*.cc from + the lists. + (OV_INCLUDES): Delete op-file.h from the list. + (OV_SRC): Delete op-file.cc from the list. + * oct-stream.cc, oct-stream.h (octave_stream_list::insert, + octave_stream_list::do_insert): Return stream number instead of + octave_value. + 2005-05-16 David Bateman * ls-mat.cc (save_mat5_binary_element): Increase size of diff -r ac4a7df431d4 -r df230b7df93c src/Makefile.in --- a/src/Makefile.in Tue May 17 08:19:03 2005 +0000 +++ b/src/Makefile.in Wed May 18 02:18:24 2005 +0000 @@ -76,7 +76,7 @@ ov-struct.h ov-scalar.h ov-range.h ov-complex.h ov-va-args.h \ ov-colon.h ov-base.h ov-base-mat.h ov-base-scalar.h \ ov-streamoff.h ov-str-mat.h ov-bool-mat.h ov-bool.h \ - ov-file.h ov-cell.h ov.h ov-fcn.h ov-builtin.h ov-dld-fcn.h \ + ov-cell.h ov.h ov-fcn.h ov-builtin.h ov-dld-fcn.h \ ov-mapper.h ov-usr-fcn.h ov-fcn-handle.h ov-fcn-inline.h \ ov-typeinfo.h ov-type-conv.h \ $(OV_INTTYPE_INC) @@ -115,9 +115,8 @@ op-ui8-ui8.cc op-ui16-ui16.cc op-ui32-ui32.cc op-ui64-ui64.cc SPARSE_OP_XSRC := op-bm-sbm.cc op-b-sbm.cc op-cm-scm.cc op-cm-sm.cc \ - op-cs-scm.cc op-cs-sm.cc op-fil-sbm.cc op-fil-scm.cc \ - op-fil-sm.cc op-m-scm.cc op-m-sm.cc op-sbm-b.cc op-sbm-bm.cc \ - op-sbm-sbm.cc op-scm-cm.cc op-scm-cs.cc op-scm-m.cc \ + op-cs-scm.cc op-cs-sm.cc op-m-scm.cc op-m-sm.cc op-sbm-b.cc \ + op-sbm-bm.cc op-sbm-sbm.cc op-scm-cm.cc op-scm-cs.cc op-scm-m.cc \ op-scm-s.cc op-scm-scm.cc op-scm-sm.cc op-sm-cm.cc \ op-sm-cs.cc op-sm-m.cc op-sm-s.cc op-sm-scm.cc op-sm-sm.cc \ op-s-scm.cc op-s-sm.cc @@ -125,9 +124,7 @@ OP_XSRC := op-b-b.cc op-b-bm.cc op-bm-b.cc op-bm-bm.cc \ op-cell.cc op-chm.cc op-cm-cm.cc op-cm-cs.cc op-cm-m.cc \ op-cm-s.cc op-cs-cm.cc op-cs-cs.cc op-cs-m.cc \ - op-cs-s.cc op-fil-b.cc op-fil-bm.cc op-fil-cm.cc \ - op-fil-cs.cc op-fil-m.cc op-fil-s.cc op-fil-lis.cc \ - op-fil-rec.cc op-fil-str.cc op-list.cc op-m-cm.cc \ + op-cs-s.cc op-list.cc op-m-cm.cc \ op-m-cs.cc op-m-m.cc op-m-s.cc op-range.cc op-s-cm.cc \ op-s-cs.cc op-s-m.cc op-s-s.cc op-str-m.cc \ op-str-s.cc op-str-str.cc op-streamoff.cc op-struct.cc \ @@ -149,7 +146,7 @@ ov-cs-list.cc ov-list.cc ov-re-mat.cc ov-cx-mat.cc \ ov-range.cc ov-scalar.cc ov-complex.cc ov-str-mat.cc \ ov-streamoff.cc ov-struct.cc ov-va-args.cc \ - ov-colon.cc ov-bool-mat.cc ov-bool.cc ov-file.cc ov-cell.cc \ + ov-colon.cc ov-bool-mat.cc ov-bool.cc ov-cell.cc \ ov.cc ov-fcn.cc ov-builtin.cc ov-dld-fcn.cc ov-mapper.cc \ ov-usr-fcn.cc ov-fcn-handle.cc ov-fcn-inline.cc ov-typeinfo.cc \ $(OV_INTTYPE_SRC) \ diff -r ac4a7df431d4 -r df230b7df93c src/file-io.cc --- a/src/file-io.cc Tue May 17 08:19:03 2005 +0000 +++ b/src/file-io.cc Wed May 18 02:18:24 2005 +0000 @@ -187,22 +187,6 @@ return retval; } -DEFUN (isstream, args, , - "-*- texinfo -*-\n\ -@deftypefn {Built-in Function} {} isstream (@var{x})\n\ -Return true if @var{x} is a stream object. Otherwise, return false.\n\ -@end deftypefn") -{ - octave_value retval; - - if (args.length () == 1) - retval = args(0).is_stream (); - else - print_usage ("isstream"); - - return retval; -} - DEFUN (fclose, args, , "-*- texinfo -*-\n\ @deftypefn {Built-in Function} {} fclose (@var{fid})\n\ @@ -481,7 +465,7 @@ "-*- texinfo -*-\n\ @deftypefn {Built-in Function} {[@var{fid}, @var{msg}] =} fopen (@var{name}, @var{mode}, @var{arch})\n\ @deftypefnx {Built-in Function} {@var{fid_list} =} fopen (\"all\")\n\ -@deftypefnx {Built-in Function} {@var{file} =} fopen (@var{fid})\n\ +@deftypefnx {Built-in Function} {[@var{file}, @var{mode}, @var{arch}] =} fopen (@var{fid})\n\ The first form of the @code{fopen} function opens the named file with\n\ the specified mode (read-write, read-only, etc.) and architecture\n\ interpretation (IEEE big endian, IEEE little endian, etc.), and returns\n\ @@ -495,8 +479,8 @@ corresponding to all the currently open files, excluding the\n\ @code{stdin}, @code{stdout}, and @code{stderr} streams.\n\ \n\ -The third form of the @code{fopen} function returns the name of a\n\ -currently open file given its file id.\n\ +The third form of the @code{fopen} function returns information about the\n\ +open file given its file id.\n\ \n\ For example,\n\ \n\ diff -r ac4a7df431d4 -r df230b7df93c src/oct-stream.cc --- a/src/oct-stream.cc Tue May 17 08:19:03 2005 +0000 +++ b/src/oct-stream.cc Wed May 18 02:18:24 2005 +0000 @@ -3860,10 +3860,10 @@ return retval; } -octave_value +int octave_stream_list::insert (const octave_stream& os) { - return (instance_ok ()) ? instance->do_insert (os) : octave_value (-1.0); + return (instance_ok ()) ? instance->do_insert (os) : -1; } octave_stream @@ -3928,7 +3928,7 @@ return (instance_ok ()) ? instance->do_get_file_number (fid) : -1; } -octave_value +int octave_stream_list::do_insert (const octave_stream& os) { octave_value retval; @@ -3962,7 +3962,7 @@ curr_len++; } - return octave_value (os, stream_number); + return stream_number; } static void diff -r ac4a7df431d4 -r df230b7df93c src/oct-stream.h --- a/src/oct-stream.h Tue May 17 08:19:03 2005 +0000 +++ b/src/oct-stream.h Wed May 18 02:18:24 2005 +0000 @@ -631,7 +631,7 @@ static bool instance_ok (void); - static octave_value insert (const octave_stream& os); + static int insert (const octave_stream& os); static octave_stream lookup (int fid, const std::string& who = std::string ()); @@ -662,7 +662,7 @@ static octave_stream_list *instance; - octave_value do_insert (const octave_stream& os); + int do_insert (const octave_stream& os); octave_stream do_lookup (int fid, const std::string& who = std::string ()) const; octave_stream do_lookup (const octave_value& fid, diff -r ac4a7df431d4 -r df230b7df93c src/ov-base.cc --- a/src/ov-base.cc Tue May 17 08:19:03 2005 +0000 +++ b/src/ov-base.cc Wed May 18 02:18:24 2005 +0000 @@ -632,14 +632,6 @@ return retval; } -octave_stream -octave_base_value::stream_value (void) const -{ - octave_stream retval; - gripe_wrong_type_arg ("octave_base_value::stream_value()", type_name ()); - return retval; -} - std::streamoff octave_base_value::streamoff_value (void) const { @@ -657,14 +649,6 @@ return retval; } -int -octave_base_value::stream_number (void) const -{ - int retval = -1; - gripe_wrong_type_arg ("octave_base_value::stream_number()", type_name ()); - return retval; -} - octave_function * octave_base_value::function_value (bool silent) { diff -r ac4a7df431d4 -r df230b7df93c src/ov-base.h --- a/src/ov-base.h Tue May 17 08:19:03 2005 +0000 +++ b/src/ov-base.h Wed May 18 02:18:24 2005 +0000 @@ -131,8 +131,6 @@ bool is_map (void) const { return false; } - bool is_stream (void) const { return false; } - bool is_streamoff (void) const { return false; } bool is_cs_list (void) const { return false; } @@ -271,10 +269,6 @@ string_vector map_keys (void) const; - octave_stream stream_value (void) const; - - int stream_number (void) const; - std::streamoff streamoff_value (void) const; streamoff_array streamoff_array_value (void) const; diff -r ac4a7df431d4 -r df230b7df93c src/ov.cc --- a/src/ov.cc Tue May 17 08:19:03 2005 +0000 +++ b/src/ov.cc Wed May 18 02:18:24 2005 +0000 @@ -773,12 +773,6 @@ rep->count = 1; } -octave_value::octave_value (const octave_stream& s, int n) - : rep (new octave_file (s, n)) -{ - rep->count = 1; -} - octave_value::octave_value (const streamoff_array& off) : rep (new octave_streamoff (off)) { @@ -1108,18 +1102,6 @@ return rep->map_value (); } -octave_stream -octave_value::stream_value (void) const -{ - return rep->stream_value (); -} - -int -octave_value::stream_number (void) const -{ - return rep->stream_number (); -} - std::streamoff octave_value::streamoff_value (void) const { @@ -2216,7 +2198,6 @@ octave_sparse_matrix::register_type (); octave_sparse_complex_matrix::register_type (); octave_struct::register_type (); - octave_file::register_type (); octave_list::register_type (); octave_cs_list::register_type (); octave_all_va_args::register_type (); diff -r ac4a7df431d4 -r df230b7df93c src/ov.h --- a/src/ov.h Tue May 17 08:19:03 2005 +0000 +++ b/src/ov.h Wed May 18 02:18:24 2005 +0000 @@ -243,7 +243,6 @@ octave_value (double base, double limit, double inc); octave_value (const Range& r); octave_value (const Octave_map& m); - octave_value (const octave_stream& s, int n); octave_value (const streamoff_array& off); octave_value (const octave_value_list& m, bool is_cs_list = false); octave_value (octave_value::magic_colon); @@ -441,9 +440,6 @@ virtual bool is_map (void) const { return rep->is_map (); } - virtual bool is_stream (void) const - { return rep->is_stream (); } - virtual bool is_streamoff (void) const { return rep->is_streamoff (); } @@ -661,10 +657,6 @@ virtual string_vector map_keys (void) const { return rep->map_keys (); } - virtual octave_stream stream_value (void) const; - - virtual int stream_number (void) const; - virtual std::streamoff streamoff_value (void) const; virtual streamoff_array streamoff_array_value (void) const;