Skip to content

Commit

Permalink
EXODIFF: Fix so command_file parsing can handle arbitrarily long line
Browse files Browse the repository at this point in the history
  • Loading branch information
gsjaardema committed Mar 8, 2024
1 parent cdb7f9d commit 31f2ad5
Showing 1 changed file with 10 additions and 11 deletions.
21 changes: 10 additions & 11 deletions packages/seacas/applications/exodiff/ED_SystemInterface.C
Original file line number Diff line number Diff line change
Expand Up @@ -1211,7 +1211,7 @@ void SystemInterface::Parse_Command_File()

Check_Parsed_Names(glob_var_names, glob_var_do_all_flag);

line = xline;
line = xline;
continue;
}
else if (abbreviation(tok1, "nodal", 4) && abbreviation(tok2, "variables", 3)) {
Expand All @@ -1221,7 +1221,7 @@ void SystemInterface::Parse_Command_File()

Check_Parsed_Names(node_var_names, node_var_do_all_flag);

line = xline;
line = xline;
continue;
}
else if (abbreviation(tok1, "element", 4) && abbreviation(tok2, "variables", 3)) {
Expand All @@ -1231,7 +1231,7 @@ void SystemInterface::Parse_Command_File()

Check_Parsed_Names(elmt_var_names, elmt_var_do_all_flag);

line = xline;
line = xline;
continue;
}
else if (tok1 == "nodeset" && abbreviation(tok2, "variables", 3)) {
Expand All @@ -1241,7 +1241,7 @@ void SystemInterface::Parse_Command_File()

Check_Parsed_Names(ns_var_names, ns_var_do_all_flag);

line = xline;
line = xline;
continue;
}
else if (abbreviation(tok1, "sideset", 4) && abbreviation(tok2, "variables", 3)) {
Expand All @@ -1251,7 +1251,7 @@ void SystemInterface::Parse_Command_File()

Check_Parsed_Names(ss_var_names, ss_var_do_all_flag);

line = xline;
line = xline;
continue;
}
else if (abbreviation(tok1, "sideset", 4) && abbreviation(tok2, "distribution", 4)) {
Expand Down Expand Up @@ -1345,7 +1345,7 @@ void SystemInterface::Parse_Command_File()

Check_Parsed_Names(eb_var_names, eb_var_do_all_flag);

line = xline;
line = xline;
continue;
}
else if (abbreviation(tok1, "faceblock", 4) && abbreviation(tok2, "variables", 3)) {
Expand All @@ -1355,7 +1355,7 @@ void SystemInterface::Parse_Command_File()

Check_Parsed_Names(fb_var_names, fb_var_do_all_flag);

line = xline;
line = xline;
continue;
}
else if (abbreviation(tok1, "element", 4) && abbreviation(tok2, "attributes", 3)) {
Expand All @@ -1365,7 +1365,7 @@ void SystemInterface::Parse_Command_File()

Check_Parsed_Names(elmt_att_names, elmt_att_do_all_flag);

line = xline;
line = xline;
continue;
}
else {
Expand All @@ -1383,8 +1383,6 @@ namespace {
Tolerance &def_tol, std::vector<std::string> &names,
std::vector<Tolerance> &toler)
{
std::string line{};

toler.clear();
names.clear();

Expand Down Expand Up @@ -1510,6 +1508,7 @@ namespace {
}
}

std::string line{};
std::getline(cmd_file, line);
xline = line;
while (!cmd_file.eof()) {
Expand All @@ -1533,7 +1532,7 @@ namespace {
names.push_back(tok);
toler.push_back(def_tol);
}
std::getline(cmd_file, line);
std::getline(cmd_file, line);
xline = line;
continue;
}
Expand Down

0 comments on commit 31f2ad5

Please sign in to comment.