[avida-cvs] avida CVS commits: /current/source/utils/hist_map hist_map.cc
mercere99
avida-cvs at alife.org
Sun Jun 8 18:20:58 PDT 2003
mercere99 Sun Jun 8 10:20:58 2003 EDT
Modified files:
/avida/current/source/utils/hist_map hist_map.cc
Log:
Another fix to hist_map.cc to make file handling work properly.
Index: avida/current/source/utils/hist_map/hist_map.cc
diff -u avida/current/source/utils/hist_map/hist_map.cc:1.3 avida/current/source/utils/hist_map/hist_map.cc:1.4
--- avida/current/source/utils/hist_map/hist_map.cc:1.3 Sat Jun 7 14:49:17 2003
+++ avida/current/source/utils/hist_map/hist_map.cc Sun Jun 8 10:20:57 2003
@@ -42,9 +42,8 @@
int total_count = 0;
- int line_num = 0;
- while (file.GetNumLines() > 0) {
- cString cur_line = file.GetLine(line_num++);
+ for (int line_num = 0; line_num < file.GetNumLines(); line_num++) {
+ cString cur_line = file.GetLine(line_num);
int value = -1;
int count = -1;
@@ -59,7 +58,7 @@
if (value < 0) {
cout << "Error in file '" << argv[i+3]
<< "': Only posive values allowed." << endl
- << " (line = " << line_num
+ << " (line = " << line_num+1
<< ", count = " << count
<< ", value = '" << value << "')" << endl;
return 1;
More information about the Avida-cvs
mailing list