Skip to content

Commit

Permalink
Merge pull request #40 from LAK132/xilinx-upstream
Browse files Browse the repository at this point in the history
Handle CRLF line endings in xdc files
  • Loading branch information
gatecat authored May 30, 2022
2 parents 565588a + 6fa2638 commit 3bfb3d0
Showing 1 changed file with 2 additions and 2 deletions.
4 changes: 2 additions & 2 deletions xilinx/xdc.cc
Original file line number Diff line number Diff line change
Expand Up @@ -31,7 +31,7 @@ void Arch::parseXdc(std::istream &in)
int lineno = 0;

auto isempty = [](const std::string &str) {
return std::all_of(str.begin(), str.end(), [](char c) { return isblank(c) || c == '\r' || c == '\n'; });
return std::all_of(str.begin(), str.end(), [](char c) { return std::isspace(c); });
};
auto strip_quotes = [](const std::string &str) {
if (str.at(0) == '"') {
Expand Down Expand Up @@ -64,7 +64,7 @@ void Arch::parseXdc(std::istream &in)
flush();
continue;
}
if (std::isblank(c)) {
if (std::isspace(c)) {
if (brcount == 0) {
flush();
continue;
Expand Down

0 comments on commit 3bfb3d0

Please sign in to comment.