# HG changeset patch # User jwe # Date 1069624004 0 # Node ID f7ce581b27fb4f0cfa630c7b810a04095d71cf52 # Parent dca0236ad77cd98872addd3f16a8abdb92aa86cd [project @ 2003-11-23 21:46:44 by jwe] diff --git a/src/ChangeLog b/src/ChangeLog --- a/src/ChangeLog +++ b/src/ChangeLog @@ -1,5 +1,7 @@ 2003-11-23 John W. Eaton + * ov.cc (install_types): Also register dld function type. + * OPERATORS/op-streamoff.cc: Install increment and decrement operators. * ov-streamoff.h (octave_streamoff::increment, octave_streamoff::decrement): New functions. diff --git a/src/file-io.cc b/src/file-io.cc --- a/src/file-io.cc +++ b/src/file-io.cc @@ -63,9 +63,9 @@ #include "oct-prcstrm.h" #include "oct-stream.h" #include "oct-strstrm.h" -#include "ov-streamoff.h" #include "pager.h" #include "pt-plot.h" +#include "so-array.h" #include "sysdep.h" #include "utils.h" #include "variables.h" diff --git a/src/oct-stream.cc b/src/oct-stream.cc --- a/src/oct-stream.cc +++ b/src/oct-stream.cc @@ -43,7 +43,6 @@ #include "oct-stdstrm.h" #include "oct-stream.h" #include "oct-obj.h" -#include "ov-streamoff.h" #include "utils.h" // Possible values for conv_err: diff --git a/src/ov-base-mat.h b/src/ov-base-mat.h --- a/src/ov-base-mat.h +++ b/src/ov-base-mat.h @@ -36,11 +36,11 @@ #include "str-vec.h" #include "error.h" +#include "oct-obj.h" #include "ov-base.h" #include "ov-typeinfo.h" class Octave_map; -class octave_value_list; class tree_walker; diff --git a/src/ov-base.cc b/src/ov-base.cc --- a/src/ov-base.cc +++ b/src/ov-base.cc @@ -33,6 +33,7 @@ #include #include "lo-ieee.h" +#include "so-array.h" #include "gripes.h" #include "oct-map.h" @@ -50,7 +51,6 @@ #include "ov-re-mat.h" #include "ov-scalar.h" #include "ov-str-mat.h" -#include "ov-streamoff.h" #include "ov-fcn-handle.h" #include "variables.h" @@ -469,7 +469,7 @@ std::streamoff octave_base_value::streamoff_value (void) const { - std::streamoff retval; + std::streamoff retval (-1); gripe_wrong_type_arg ("octave_base_value::streamoff_value()", type_name ()); return retval; } diff --git a/src/ov-fcn-handle.cc b/src/ov-fcn-handle.cc --- a/src/ov-fcn-handle.cc +++ b/src/ov-fcn-handle.cc @@ -54,7 +54,7 @@ octave_fcn_handle::print_raw (std::ostream& os, bool pr_as_read_syntax) const { indent (os); - os << "@" << name (); + os << name (); } octave_value @@ -97,7 +97,9 @@ { Octave_map m; - m ["function"](0) = fh->name (); + std::string fh_nm = fh->name (); + + m ["function"](0) = fh_nm.substr (1); if (fcn->is_nested_function ()) m ["type"](0) = "subfunction"; @@ -139,7 +141,10 @@ octave_fcn_handle *fh = args(0).fcn_handle_value (); if (! error_state && fh) - retval = fh->name (); + { + std::string fh_nm = fh->name (); + retval = fh_nm.substr (1); + } else error ("func2str: expecting valid function handle as first argument"); } diff --git a/src/ov-fcn-handle.h b/src/ov-fcn-handle.h --- a/src/ov-fcn-handle.h +++ b/src/ov-fcn-handle.h @@ -43,10 +43,10 @@ { public: - octave_fcn_handle (void) : fcn (0), nm () { } + octave_fcn_handle (void) : fcn (0), nm ("[]") { } octave_fcn_handle (octave_function *f, const std::string& n) - : fcn (f), nm (n) { } + : fcn (f), nm (std::string ("@") + n) { } octave_fcn_handle (const octave_fcn_handle& fh) : fcn (fh.fcn), nm (fh.nm) { } @@ -83,7 +83,7 @@ // The function we are handling. octave_function *fcn; - // The name of the handle. + // The name of the handle, including the "@". std::string nm; DECLARE_OCTAVE_ALLOCATOR diff --git a/src/ov-re-mat.h b/src/ov-re-mat.h --- a/src/ov-re-mat.h +++ b/src/ov-re-mat.h @@ -34,12 +34,12 @@ #include "mx-base.h" #include "oct-alloc.h" +#include "so-array.h" #include "str-vec.h" #include "error.h" #include "ov-base.h" #include "ov-base-mat.h" -#include "ov-streamoff.h" #include "ov-typeinfo.h" class Octave_map; diff --git a/src/ov.cc b/src/ov.cc --- a/src/ov.cc +++ b/src/ov.cc @@ -54,6 +54,7 @@ #include "ov-va-args.h" #include "ov-builtin.h" #include "ov-mapper.h" +#include "ov-dld-fcn.h" #include "ov-usr-fcn.h" #include "ov-fcn-handle.h" #include "ov-typeinfo.h" @@ -1898,6 +1899,7 @@ octave_builtin::register_type (); octave_mapper::register_type (); octave_user_function::register_type (); + octave_dld_function::register_type (); octave_fcn_handle::register_type (); octave_streamoff::register_type (); }