changeset 2743:a5f2dec3b3c4 octave-forge

code cleanup
author abarth93
date Tue, 24 Oct 2006 02:12:08 +0000
parents 8ff1cc06fa00
children db955f60e3d2
files main/io/src/textread.cc
diffstat 1 files changed, 4 insertions(+), 6 deletions(-) [+]
line wrap: on
line diff
--- a/main/io/src/textread.cc	Tue Oct 24 02:06:34 2006 +0000
+++ b/main/io/src/textread.cc	Tue Oct 24 02:12:08 2006 +0000
@@ -56,7 +56,7 @@
 	}
     }
 
-    bool
+    void
     open()
     {
 	data.open(filename.c_str());
@@ -128,7 +128,7 @@
     void
     readline()
     {
-	data.getline(buffer, 4096);
+	data.getline(buffer, BUFFER_SIZE);
 	if (std::string(buffer).length() != 0) {
 	    line.str(buffer);
 	    line.clear();
@@ -280,7 +280,7 @@
     std::vector<Matrix> matrix_output;
     std::vector<Cell> cell_output;
 
-    for (int i = 0; i < input.columns.size(); i++) {
+    for (unsigned int i = 0; i < input.columns.size(); i++) {
 	if ((input.columns[i] == "%d") || (input.columns[i] == "%f") || (input.columns[i] == "%u")) {
 	    // Storage matrix
 	    matrix_output.push_back(Matrix(1, nr_rows, 0));
@@ -299,8 +299,6 @@
     }
 
     std::string s;
-    double d;
-    char buf[1024];
     long unsigned int row = 0;
     try 
 	{
@@ -335,7 +333,7 @@
 	}
 
     dim_vector dim(1, nr_rows);
-    for (int i = 0; i < input.columns.size(); i++) {
+    for (unsigned int i = 0; i < input.columns.size(); i++) {
 	long unsigned int cl = cell_output[i].length();
 	long unsigned int ml = matrix_output[i].length();