diff src/toplev.cc @ 4051:b79da8779a0e

[project @ 2002-08-17 19:38:32 by jwe]
author jwe
date Sat, 17 Aug 2002 19:38:33 +0000
parents 41e7fa40ff4c
children babc519f245b
line wrap: on
line diff
--- a/src/toplev.cc	Sat Aug 17 02:18:18 2002 +0000
+++ b/src/toplev.cc	Sat Aug 17 19:38:33 2002 +0000
@@ -30,7 +30,6 @@
 
 #include <fstream>
 #include <iostream>
-#include <strstream>
 #include <string>
 
 #ifdef HAVE_UNISTD_H
@@ -49,6 +48,7 @@
 #include "file-ops.h"
 #include "lo-error.h"
 #include "lo-mappers.h"
+#include "lo-sstream.h"
 #include "oct-env.h"
 #include "str-vec.h"
 
@@ -341,7 +341,7 @@
 
       if (*cmd)
 	{
-	  std::ostrstream output_buf;
+	  OSSTREAM output_buf;
 
 	  // XXX FIXME XXX -- sometimes, the subprocess hasn't written
 	  // anything before we try to read from the procstream.  The
@@ -373,14 +373,12 @@
 	  else
 	    cmd_status = 127;
 
-	  output_buf << std::ends;
-
-	  char *msg = output_buf.str ();
+	  output_buf << OSSTREAM_ENDS;
 
 	  retval(1) = (double) cmd_status;
-	  retval(0) = msg;
+	  retval(0) = OSSTREAM_STR (output_buf);
 
-	  delete [] msg;
+	  OSSTREAM_FREEZE (output_buf);
 	}
 
       unwind_protect::run ();