# HG changeset patch # User jwe # Date 1201934927 0 # Node ID 6873fe003323ccef71606d01ce16807931f09488 # Parent 3e450caf93f2959920d25bb612312787af622763 [project @ 2008-02-02 06:48:47 by jwe] diff --git a/src/ChangeLog b/src/ChangeLog --- a/src/ChangeLog +++ b/src/ChangeLog @@ -1,3 +1,9 @@ +2008-02-02 John W. Eaton + + * help.cc (do_type): Don't print dyamically loaded function files. + + * ov-fcn.h (octave_function::is_dynamically_loaded_function): Delete. + 2008-02-01 John W. Eaton * symtab.cc (Fset_variable, Fvariable_value): diff --git a/src/help.cc b/src/help.cc --- a/src/help.cc +++ b/src/help.cc @@ -1144,8 +1144,8 @@ if (fs) { if (pr_type_info && ! quiet) - os << name << " is the " << type - << " defined from: " << fname << "\n\n"; + os << name << " is the " << type << " defined from the file\n" + << fname << ":\n\n"; char ch; @@ -1183,23 +1183,38 @@ { octave_function *fcn = val.function_value (); - std::string fn = fcn ? fcn->fcn_file_name () : std::string (); + if (fcn) + { + std::string fn = fcn->fcn_file_name (); - if (pr_orig_txt && ! fn.empty ()) - display_file (os, name, fn, "function", pr_type_info, quiet); - else - { - if (pr_type_info && ! quiet) + if (fcn->is_builtin_function ()) + os << name << " is a built-in function" << std::endl; + else if (fcn->is_dld_function () || fcn->is_mex_function ()) + os << name + << " is a dyanmically loaded function from the file\n" + << fn << std::endl; + else if (pr_orig_txt && ! fn.empty ()) + display_file (os, name, fn, "function", pr_type_info, quiet); + else { - std::string type - = fcn->is_user_function () ? "command-line" : "built-in"; + if (pr_type_info && ! quiet) + { + os << name; - os << name << " is a " << type << " function:\n\n"; + if (fcn->is_user_function ()) + { + if (fn.empty ()) + os << " is a command-line function:\n\n"; + else + os << " is a function defined from the file\n" + << fn << ":\n\n"; + } + } + + tree_print_code tpc (os, "", pr_orig_txt); + + fcn->accept (tpc); } - - tree_print_code tpc (os, "", pr_orig_txt); - - fcn->accept (tpc); } } else diff --git a/src/ov-fcn.h b/src/ov-fcn.h --- a/src/ov-fcn.h +++ b/src/ov-fcn.h @@ -56,8 +56,6 @@ bool is_function (void) const { return true; } - virtual bool is_dynamically_loaded_function (void) const { return false; } - virtual bool is_system_fcn_file (void) const { return false; } virtual std::string fcn_file_name (void) const { return std::string (); }