Mercurial > hg > octave-lyh
diff src/help.cc @ 5765:7ba9ad1fec11
[project @ 2006-04-17 05:05:15 by jwe]
author | jwe |
---|---|
date | Mon, 17 Apr 2006 05:05:17 +0000 |
parents | 126d7f1945ee |
children | 412f72146ab5 |
line wrap: on
line diff
--- a/src/help.cc +++ b/src/help.cc @@ -30,6 +30,7 @@ #include <iostream> #include <fstream> +#include <sstream> #include <string> #ifdef HAVE_UNISTD_H @@ -41,7 +42,6 @@ #include "cmd-edit.h" #include "file-ops.h" -#include "lo-sstream.h" #include "oct-env.h" #include "str-vec.h" @@ -644,7 +644,7 @@ if (cols > 80) cols = 72; - OSSTREAM buf; + std::ostringstream buf; buf << "sed -e 's/^[#%][#%]* *//' -e 's/^ *@/@/' | " << "\"" << Vmakeinfo_prog << "\"" @@ -656,12 +656,9 @@ << " --no-validate" << " --no-headers" << " --force" - << " --output \"" << tmp_file_name << "\"" - << OSSTREAM_ENDS; + << " --output \"" << tmp_file_name << "\""; - oprocstream filter (OSSTREAM_STR (buf)); - - OSSTREAM_FREEZE (buf); + oprocstream filter (buf.str ()); if (filter && filter.is_open ()) { @@ -999,7 +996,7 @@ if (idx < argc) { - OSSTREAM output_buf; + std::ostringstream output_buf; for (int i = idx; i < argc; i++) { @@ -1015,13 +1012,7 @@ } if (nargout != 0) - { - output_buf << OSSTREAM_ENDS; - - retval = OSSTREAM_STR (output_buf); - - OSSTREAM_FREEZE (output_buf); - } + retval = output_buf.str (); } else print_usage ("type"); @@ -1131,7 +1122,7 @@ { // Get the parsed help string. pos = 0; - OSSTREAM os; + std::ostringstream os; display_help_text (os, h); std::string h2 = os.str ();