diff src/ov-fcn-handle.cc @ 5765:7ba9ad1fec11

[project @ 2006-04-17 05:05:15 by jwe]
author jwe
date Mon, 17 Apr 2006 05:05:17 +0000
parents 8d7162924bd3
children ace8d8d26933
line wrap: on
line diff
--- a/src/ov-fcn-handle.cc	Sun Apr 16 19:10:01 2006 +0000
+++ b/src/ov-fcn-handle.cc	Mon Apr 17 05:05:17 2006 +0000
@@ -26,6 +26,7 @@
 #endif
 
 #include <iostream>
+#include <sstream>
 #include <vector>
 
 #include "defun.h"
@@ -164,7 +165,7 @@
   if (nm == "@<anonymous>")
     {
       char c;
-      OSSTREAM buf;
+      std::ostringstream buf;
 
       // Skip preceeding newline(s).
       while (is.get (c) && c == '\n')
@@ -186,12 +187,9 @@
 	    }
 	}
 
-      buf << OSSTREAM_ENDS;
-
       int parse_status;
-      octave_value anon_fcn_handle = eval_string (OSSTREAM_STR (buf), 
-						  true, parse_status);
-      OSSTREAM_FREEZE (buf);
+      octave_value anon_fcn_handle = eval_string (buf.str (), true,
+						  parse_status);
 
       if (parse_status == 0)
 	{
@@ -222,10 +220,9 @@
   os.write (nm.c_str (), nm.length ());
   if (nm == "@<anonymous>")
     {
-      OSSTREAM buf;
+      std::ostringstream buf;
       print_raw (buf, true);
-      std::string stmp = OSSTREAM_STR (buf);
-      OSSTREAM_FREEZE (buf);
+      std::string stmp = buf.str ();
       tmp = stmp.length ();
       os.write (reinterpret_cast<char *> (&tmp), 4);
       os.write (stmp.c_str (), stmp.length ());
@@ -328,10 +325,9 @@
 
   if (nm == "@<anonymous>")
     {
-      OSSTREAM buf;
+      std::ostringstream buf;
       print_raw (buf, true);
-      std::string stmp = OSSTREAM_STR (buf);
-      OSSTREAM_FREEZE (buf);
+      std::string stmp = buf.str ();
 
       // attach the type of the variable
       H5Tset_size (type_hid, stmp.length () + 1);