changeset 6348:1f5de98984c3

[project @ 2007-02-23 05:24:56 by jwe]
author jwe
date Fri, 23 Feb 2007 05:24:56 +0000
parents e40a46a100b6
children 859f7aaea254
files src/ChangeLog src/DLD-FUNCTIONS/dispatch.cc src/help.cc
diffstat 3 files changed, 14 insertions(+), 13 deletions(-) [+]
line wrap: on
line diff
--- a/src/ChangeLog	Fri Feb 23 00:28:58 2007 +0000
+++ b/src/ChangeLog	Fri Feb 23 05:24:56 2007 +0000
@@ -1,3 +1,12 @@
+2007-02-23  John W. Eaton  <jwe@octave.org>
+
+	* DLD-FUNCTIONS/dispatch.cc (Fbuiltin): Also adjust argument list
+	in calls to functions that are not overloaded.  Call
+	lookup_by_name to find function instead of searching fbi_symtab
+	directly.
+
+	* help.cc (do_which): Return empty string if file not found.
+
 2007-02-22  John W. Eaton  <jwe@octave.org>
 
 	* mex.cc (mxArray_cell::mxArray_cell (const mxArray_cell&),
--- a/src/DLD-FUNCTIONS/dispatch.cc	Fri Feb 23 00:28:58 2007 +0000
+++ b/src/DLD-FUNCTIONS/dispatch.cc	Fri Feb 23 05:24:56 2007 +0000
@@ -306,20 +306,19 @@
       if (error_state)
 	return retval;
 
-      symbol_record *sr = fbi_sym_tab->lookup (name, 0);
+      symbol_record *sr = lookup_by_name (name, 0);
 
-      if (sr)
+      if (sr && sr->is_function ())
 	{
 	  if (sr->def().type_id () == octave_dispatch::static_type_id ())
 	    {
 	      octave_function *fcn = builtin (name);
 
 	      if (!error_state && fcn)
-		retval = fcn->do_multi_index_op (nargout,
-						 args.splice (0, 1, retval));
+		retval = fcn->do_multi_index_op (nargout, args.splice (0, 1));
 	    }
 	  else
-	    retval = feval (name, args, nargout);
+	    retval = feval (name, args.splice (0, 1), nargout);
 	}
       else
 	error ("builtin: lookup for symbol `%s' failed", name.c_str ());
--- a/src/help.cc	Fri Feb 23 00:28:58 2007 +0000
+++ b/src/help.cc	Fri Feb 23 05:24:56 2007 +0000
@@ -1317,14 +1317,7 @@
   if (sym_rec && sym_rec->is_defined ())
     retval = sym_rec->which ();
   else
-    {
-      std::string path = fcn_file_in_path (name);
-
-      if (! path.empty ())
-	retval = path;
-      else
-	retval = "undefined";
-    }
+    retval = fcn_file_in_path (name);
 
   return retval;
 }