Mercurial > hg > octave-nkf
diff src/pr-output.cc @ 5765:7ba9ad1fec11
[project @ 2006-04-17 05:05:15 by jwe]
author | jwe |
---|---|
date | Mon, 17 Apr 2006 05:05:17 +0000 |
parents | ce79d238f142 |
children | 6a9244f89a2a |
line wrap: on
line diff
--- a/src/pr-output.cc +++ b/src/pr-output.cc @@ -32,6 +32,7 @@ #include <iomanip> #include <iostream> +#include <sstream> #include <string> #include "Array-util.h" @@ -40,7 +41,6 @@ #include "cmd-edit.h" #include "dMatrix.h" #include "lo-mappers.h" -#include "lo-sstream.h" #include "mach-info.h" #include "oct-cmplx.h" #include "quit.h" @@ -1546,7 +1546,7 @@ { \ nm += "(:,:,"; \ \ - OSSTREAM buf; \ + std::ostringstream buf; \ \ for (int k = 2; k < ndims; k++) \ { \ @@ -1558,11 +1558,7 @@ buf << ")"; \ } \ \ - buf << OSSTREAM_ENDS; \ - \ - nm += OSSTREAM_STR (buf); \ - \ - OSSTREAM_FREEZE (buf); \ + nm += buf.str (); \ } \ \ Array<idx_vector> idx (ndims); \ @@ -2044,7 +2040,7 @@ { nm += "(:,:,"; - OSSTREAM buf; + std::ostringstream buf; for (int k = 2; k < ndims; k++) { @@ -2056,11 +2052,7 @@ buf << ")"; } - buf << OSSTREAM_ENDS; - - nm += OSSTREAM_STR (buf); - - OSSTREAM_FREEZE (buf); + nm += buf.str (); } Array<idx_vector> idx (ndims); @@ -2219,7 +2211,7 @@ { std::string nm = "ans(:,:,"; - OSSTREAM buf; + std::ostringstream buf; for (int k = 2; k < ndims; k++) { @@ -2231,11 +2223,7 @@ buf << ")"; } - buf << OSSTREAM_ENDS; - - nm += OSSTREAM_STR (buf); - - OSSTREAM_FREEZE (buf); + nm += buf.str (); os << nm << " =\n\n"; } @@ -2328,7 +2316,7 @@ { std::string nm = "ans(:,:,"; - OSSTREAM buf; + std::ostringstream buf; for (int k = 2; k < ndims; k++) { @@ -2340,11 +2328,7 @@ buf << ")"; } - buf << OSSTREAM_ENDS; - - nm += OSSTREAM_STR (buf); - - OSSTREAM_FREEZE (buf); + nm += buf.str (); os << nm << " =\n\n"; } @@ -2552,11 +2536,9 @@ args(0).print (octave_stdout); else { - OSSTREAM buf; + std::ostringstream buf; args(0).print (buf); - buf << OSSTREAM_ENDS; - retval = OSSTREAM_STR (buf); - OSSTREAM_FREEZE (buf); + retval = buf.str (); } } else