Mercurial > hg > octave-nkf
comparison src/help.cc @ 5484:2ff5363a16bd
[project @ 2005-10-06 17:12:12 by jwe]
author | jwe |
---|---|
date | Thu, 06 Oct 2005 17:12:13 +0000 |
parents | d2df058c4319 |
children | 7e008607a86e |
comparison
equal
deleted
inserted
replaced
5483:d2df058c4319 | 5484:2ff5363a16bd |
---|---|
847 static bool | 847 static bool |
848 help_from_file (std::ostream& os, const std::string& nm, bool& symbol_found) | 848 help_from_file (std::ostream& os, const std::string& nm, bool& symbol_found) |
849 { | 849 { |
850 bool retval = false; | 850 bool retval = false; |
851 | 851 |
852 std::string file = fcn_file_in_path (nm); | 852 std::string h = get_help_from_file (nm, symbol_found, true); |
853 | 853 |
854 if (file.length () > 0) | 854 if (h.length () > 0) |
855 { | 855 { |
856 symbol_found = true; | 856 display_help_text (os, h); |
857 | 857 os << "\n"; |
858 std::string h = get_help_from_file (file); | 858 retval = true; |
859 | |
860 if (h.length () > 0) | |
861 { | |
862 os << nm << " is the file: " << file << "\n\n"; | |
863 display_help_text (os, h); | |
864 os << "\n"; | |
865 retval = true; | |
866 } | |
867 } | 859 } |
868 | 860 |
869 return retval; | 861 return retval; |
870 } | 862 } |
871 | 863 |
1713 | 1705 |
1714 | 1706 |
1715 if (file_name == dirs[i] + tmp(0) | 1707 if (file_name == dirs[i] + tmp(0) |
1716 || file_name == dirs[i] + tmp(1)) | 1708 || file_name == dirs[i] + tmp(1)) |
1717 { | 1709 { |
1718 std::string h = get_help_from_file (file_name); | 1710 bool symbol_found; |
1711 | |
1712 std::string h | |
1713 = get_help_from_file (file_name, symbol_found); | |
1719 | 1714 |
1720 std::string s; | 1715 std::string s; |
1721 if (first_sentence_only) | 1716 if (first_sentence_only) |
1722 s = first_help_sentence (h); | 1717 s = first_help_sentence (h); |
1723 else | 1718 else |