Mercurial > hg > octave-max
changeset 993:34c1b152d6a3
[project @ 1994-12-15 16:46:46 by jwe]
author | jwe |
---|---|
date | Thu, 15 Dec 1994 16:46:46 +0000 |
parents | 2015030c0621 |
children | 6ada1ed8eba6 |
files | src/help.cc src/pager.cc src/variables.cc |
diffstat | 3 files changed, 10 insertions(+), 4 deletions(-) [+] |
line wrap: on
line diff
--- a/src/help.cc +++ b/src/help.cc @@ -682,13 +682,17 @@ } } - char *h = get_help_from_file (*argv); + char *path = fcn_file_in_path (*argv); + char *h = get_help_from_file (path); if (h && *h) { - output_buf << "\n" << h << "\n"; + output_buf << *argv << " is the file:\n" + << path << "\n\n" << h << "\n"; delete [] h; + delete [] path; continue; } + delete [] path; output_buf << "\nhelp: sorry, `" << *argv << "' is not documented\n";
--- a/src/pager.cc +++ b/src/pager.cc @@ -152,6 +152,7 @@ pager_stream << message; delete [] message; pager_stream.flush (); + pager_stream.close (); signal (SIGINT, old_sigint_handler);
--- a/src/variables.cc +++ b/src/variables.cc @@ -557,6 +557,8 @@ break; case '\n': + if (first_comments_seen) + have_help_text = 1; input_line_number++; current_input_column = 0; continue; @@ -776,9 +778,8 @@ } char * -get_help_from_file (const char *f) +get_help_from_file (const char *path) { - char *path = fcn_file_in_path (f); if (path && *path) { FILE *fptr = fopen (path, "r");