diff src/ls-oct-ascii.cc @ 5765:7ba9ad1fec11

[project @ 2006-04-17 05:05:15 by jwe]
author jwe
date Mon, 17 Apr 2006 05:05:17 +0000
parents a9ac02e9fda5
children ace8d8d26933
line wrap: on
line diff
--- a/src/ls-oct-ascii.cc
+++ b/src/ls-oct-ascii.cc
@@ -33,6 +33,7 @@
 #include <fstream>
 #include <iomanip>
 #include <iostream>
+#include <sstream>
 #include <string>
 
 #include "byte-swap.h"
@@ -40,7 +41,6 @@
 #include "file-ops.h"
 #include "glob-match.h"
 #include "lo-mappers.h"
-#include "lo-sstream.h"
 #include "mach-info.h"
 #include "oct-env.h"
 #include "oct-time.h"
@@ -120,7 +120,7 @@
     {
       if (c == '%' || c == '#')
 	{
-	  OSSTREAM buf;
+	  std::ostringstream buf;
 	
 	  while (is.get (c) && (c == ' ' || c == '\t' || c == '%' || c == '#'))
 	    ; // Skip whitespace and comment characters.
@@ -131,14 +131,12 @@
 	  while (is.get (c) && isalpha (c))
 	    buf << c;
 
-	  buf << OSSTREAM_ENDS;
-	  std::string tmp = OSSTREAM_STR (buf);
+	  std::string tmp = buf.str ();
 	  bool match = (tmp.compare (0, strlen (keyword), keyword) == 0);
-	  OSSTREAM_FREEZE (buf);
 
 	  if (match)
 	    {
-	      OSSTREAM value;
+	      std::ostringstream value;
 	      while (is.get (c) && (c == ' ' || c == '\t' || c == ':'))
 		; // Skip whitespace and the colon.
 
@@ -148,9 +146,8 @@
 		  while (is.get (c) && c != '\n')
 		    value << c;
 		}
-	      value << OSSTREAM_ENDS;
-	      retval = OSSTREAM_STR (value);
-	      OSSTREAM_FREEZE (value);
+
+	      retval = value.str ();
 	      break;
 	    }
 	  else if (next_only)