aboutsummaryrefslogtreecommitdiffstats
path: root/frontends
diff options
context:
space:
mode:
authorMiodrag Milanović <mmicko@gmail.com>2019-09-30 17:49:23 +0200
committerGitHub <noreply@github.com>2019-09-30 17:49:23 +0200
commit0d27ffd4e6d53349d80d6f29f9e6b2f1c4b03cb7 (patch)
treebd4c25fab759a4dc4a7354a9f6fc72205e97dfda /frontends
parent7ed13297b104c200f6d15cf1265417e823c8d308 (diff)
parent9e55b234b47b01dc396e793b7f31236c9e87c185 (diff)
downloadyosys-0d27ffd4e6d53349d80d6f29f9e6b2f1c4b03cb7.tar.gz
yosys-0d27ffd4e6d53349d80d6f29f9e6b2f1c4b03cb7.tar.bz2
yosys-0d27ffd4e6d53349d80d6f29f9e6b2f1c4b03cb7.zip
Merge pull request #1416 from YosysHQ/mmicko/frontend_binary_in
Open aig frontend as binary file
Diffstat (limited to 'frontends')
-rw-r--r--frontends/aiger/aigerparse.cc8
1 files changed, 6 insertions, 2 deletions
diff --git a/frontends/aiger/aigerparse.cc b/frontends/aiger/aigerparse.cc
index 986d34fb3..5a1da4db1 100644
--- a/frontends/aiger/aigerparse.cc
+++ b/frontends/aiger/aigerparse.cc
@@ -285,6 +285,8 @@ end_of_header:
}
else if (c == 'c') {
f.ignore(1);
+ if (f.peek() == '\r')
+ f.ignore(1);
if (f.peek() == '\n')
break;
// Else constraint (TODO)
@@ -1056,13 +1058,15 @@ struct AigerFrontend : public Frontend {
}
break;
}
- extra_args(f, filename, args, argidx);
+ extra_args(f, filename, args, argidx, true);
if (module_name.empty()) {
#ifdef _WIN32
char fname[_MAX_FNAME];
_splitpath(filename.c_str(), NULL /* drive */, NULL /* dir */, fname, NULL /* ext */);
- module_name = fname;
+ char* bn = strdup(fname);
+ module_name = RTLIL::escape_id(bn);
+ free(bn);
#else
char* bn = strdup(filename.c_str());
module_name = RTLIL::escape_id(bn);