changeset 3559:12d7ec415f35

[project @ 2000-02-03 05:17:36 by jwe]
author jwe
date Thu, 03 Feb 2000 05:17:36 +0000
parents d2d769ed9eaa
children e3e8cfe73935
files src/oct-stream.cc
diffstat 1 files changed, 12 insertions(+), 10 deletions(-) [+]
line wrap: on
line diff
--- a/src/oct-stream.cc
+++ b/src/oct-stream.cc
@@ -29,6 +29,7 @@
 
 #include <iomanip>
 #include <strstream>
+#include <fstream>
 #include <string>
 
 #include "lo-ieee.h"
@@ -1008,7 +1009,7 @@
 template <class T>
 void
 do_scanf_conv (std::istream& is, const char *fmt, T valptr, Matrix& mval,
-	       double *data, int& idx, int& conv_count, int nr,
+	       double *data, int& idx, int& conversion_count, int nr,
 	       int max_size, bool discard) 
 {
   is.scan (fmt, valptr);
@@ -1029,7 +1030,7 @@
 
       if (! discard)
 	{
-	  conv_count++;
+	  conversion_count++;
 	  data[idx++] = *(valptr);
 	}
     }
@@ -1552,11 +1553,11 @@
 
 octave_value
 octave_base_stream::scanf (const std::string& fmt, const Matrix& size,
-			   int& count)
+			   int& conversion_count)
 {
   octave_value retval = Matrix ();
 
-  count = 0;
+  conversion_count = 0;
 
   std::istream *isp = input_stream ();
 
@@ -1618,7 +1619,8 @@
 	    get_size (size, nr, nc, one_elt_size_spec, "fscanf");
 
 	    if (! error_state)
-	      retval = do_scanf (fmt_list, nr, nc, one_elt_size_spec, count);
+	      retval = do_scanf (fmt_list, nr, nc, one_elt_size_spec,
+				 conversion_count);
 	  }
 	  break;
 	}
@@ -3108,11 +3110,11 @@
 	  std::string name = os.name ();
 
 	  buf << "  "
-	      << setiosflags (std::ios::right)
-	      << setw (4) << i << "     "
-	      << setiosflags (std::ios::left)
-	      << setw (3) << mode.c_str () << "  "
-	      << setw (9) << arch.c_str () << "  "
+	      << std::setiosflags (std::ios::right)
+	      << std::setw (4) << i << "     "
+	      << std::setiosflags (std::ios::left)
+	      << std::setw (3) << mode.c_str () << "  "
+	      << std::setw (9) << arch.c_str () << "  "
 	      << name << "\n";
 	}
     }