projects
/
yosys.git
/ commitdiff
commit
grep
author
committer
pickaxe
?
search:
re
summary
|
shortlog
|
log
|
commit
| commitdiff |
tree
raw
|
patch
| inline |
side by side
(parent:
3f70c1f
)
Fix reading aig files on windows
author
Miodrag Milanovic
<mmicko@gmail.com>
Sun, 29 Sep 2019 13:40:37 +0000
(15:40 +0200)
committer
Miodrag Milanovic
<mmicko@gmail.com>
Sun, 29 Sep 2019 13:40:37 +0000
(15:40 +0200)
frontends/aiger/aigerparse.cc
patch
|
blob
|
history
diff --git
a/frontends/aiger/aigerparse.cc
b/frontends/aiger/aigerparse.cc
index b0a04749c06735c92c3dfd70bf614e5d23c2200c..ad35e9d76c7006b3e3936f23666bea2157835499 100644
(file)
--- 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)
@@
-1062,7
+1064,9
@@
struct AigerFrontend : public Frontend {
#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);