changeset 4649:f7ce581b27fb

[project @ 2003-11-23 21:46:44 by jwe]
author jwe
date Sun, 23 Nov 2003 21:46:44 +0000
parents dca0236ad77c
children 623f6262a8e9
files src/ChangeLog src/file-io.cc src/oct-stream.cc src/ov-base-mat.h src/ov-base.cc src/ov-fcn-handle.cc src/ov-fcn-handle.h src/ov-re-mat.h src/ov.cc
diffstat 9 files changed, 20 insertions(+), 12 deletions(-) [+]
line wrap: on
line diff
--- a/src/ChangeLog	Sun Nov 23 19:36:33 2003 +0000
+++ b/src/ChangeLog	Sun Nov 23 21:46:44 2003 +0000
@@ -1,5 +1,7 @@
 2003-11-23  John W. Eaton  <jwe@bevo.che.wisc.edu>
 
+	* 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.
--- a/src/file-io.cc	Sun Nov 23 19:36:33 2003 +0000
+++ b/src/file-io.cc	Sun Nov 23 21:46:44 2003 +0000
@@ -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"
--- a/src/oct-stream.cc	Sun Nov 23 19:36:33 2003 +0000
+++ b/src/oct-stream.cc	Sun Nov 23 21:46:44 2003 +0000
@@ -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:
--- a/src/ov-base-mat.h	Sun Nov 23 19:36:33 2003 +0000
+++ b/src/ov-base-mat.h	Sun Nov 23 21:46:44 2003 +0000
@@ -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;
 
--- a/src/ov-base.cc	Sun Nov 23 19:36:33 2003 +0000
+++ b/src/ov-base.cc	Sun Nov 23 21:46:44 2003 +0000
@@ -33,6 +33,7 @@
 #include <iostream>
 
 #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;
 }
--- a/src/ov-fcn-handle.cc	Sun Nov 23 19:36:33 2003 +0000
+++ b/src/ov-fcn-handle.cc	Sun Nov 23 21:46:44 2003 +0000
@@ -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");
     }
--- a/src/ov-fcn-handle.h	Sun Nov 23 19:36:33 2003 +0000
+++ b/src/ov-fcn-handle.h	Sun Nov 23 21:46:44 2003 +0000
@@ -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
--- a/src/ov-re-mat.h	Sun Nov 23 19:36:33 2003 +0000
+++ b/src/ov-re-mat.h	Sun Nov 23 21:46:44 2003 +0000
@@ -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;
--- a/src/ov.cc	Sun Nov 23 19:36:33 2003 +0000
+++ b/src/ov.cc	Sun Nov 23 21:46:44 2003 +0000
@@ -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 ();
 }