Skip to content
Snippets Groups Projects
Commit 29ee2d04 authored by Robert Ricci's avatar Robert Ricci
Browse files

Bump up the maximum line size for lines in the ptop file, and make

errors in the ptop file immediately fatal - we were somehow getting
into a state where the istream for the file was returning !eof, but
reading data from it got only empty strings.
parent b537b0ff
No related branches found
No related tags found
No related merge requests found
......@@ -19,7 +19,7 @@ using namespace boost;
extern name_pvertex_map pname2vertex;
extern name_count_map ptypes;
#define ptop_error(s) errors++;cout << "PTOP:" << line << ": " << s << endl
#define ptop_error(s) errors++;cout << "PTOP:" << line << ": " << s << endl; exit(EXIT_FATAL)
#define ptop_error_noline(s) errors++;cout << "PTOP: " << s << endl
// Used to do late binding of subnode names to pnodes, so that we're no
......@@ -54,12 +54,12 @@ int parse_ptop(tb_pgraph &PG, tb_sgraph &SG, istream& i)
{
int num_nodes = 0;
int line=0,errors=0;
char inbuf[4096];
char inbuf[16384];
string_vector parsed_line;
while (!i.eof()) {
line++;
i.getline(inbuf,4096);
i.getline(inbuf,16384);
parsed_line = split_line(inbuf,' ');
if (parsed_line.size() == 0) {continue;}
......
0% Loading or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment