Loading Statsgen/include/utils.h +5 −0 Changes for Statsgen/include/utils.h: 5 added lines, 0 removed lines. Original line number Diff line number Diff line Loading @@ -116,6 +116,11 @@ int nbline_file(const string & filename) { getline(readfile, line); ++nb; } // we have not read the whole file if (readfile.fail() && !readfile.eof()){ cerr << "There was an error reading the file at line " << nb << endl; return 0; } return nb; } Loading Statsgen/src/statsgen.cpp +3 −0 Changes for Statsgen/src/statsgen.cpp: 3 added lines, 0 removed lines. Original line number Diff line number Diff line Loading @@ -108,6 +108,9 @@ int Statsgen::generate_stats() { int nbline = 0; if (!is_stdin){ nbline = nbline_file(filename); if (!nbline){ // error reading the file return 0; } } int rc; Loading Loading
Statsgen/include/utils.h +5 −0 Changes for Statsgen/include/utils.h: 5 added lines, 0 removed lines. Original line number Diff line number Diff line Loading @@ -116,6 +116,11 @@ int nbline_file(const string & filename) { getline(readfile, line); ++nb; } // we have not read the whole file if (readfile.fail() && !readfile.eof()){ cerr << "There was an error reading the file at line " << nb << endl; return 0; } return nb; } Loading
Statsgen/src/statsgen.cpp +3 −0 Changes for Statsgen/src/statsgen.cpp: 3 added lines, 0 removed lines. Original line number Diff line number Diff line Loading @@ -108,6 +108,9 @@ int Statsgen::generate_stats() { int nbline = 0; if (!is_stdin){ nbline = nbline_file(filename); if (!nbline){ // error reading the file return 0; } } int rc; Loading