mirror of
https://github.com/YosysHQ/yosys
synced 2025-06-19 12:23:39 +00:00
Added support for "file names with blanks"
This commit is contained in:
parent
aa0ab975b9
commit
21a1cc1b60
7 changed files with 43 additions and 33 deletions
|
@ -607,6 +607,7 @@ struct ExtractPass : public Pass {
|
|||
else
|
||||
{
|
||||
std::ifstream f;
|
||||
rewrite_filename(filename);
|
||||
f.open(filename.c_str());
|
||||
if (f.fail()) {
|
||||
delete map;
|
||||
|
@ -746,6 +747,7 @@ struct ExtractPass : public Pass {
|
|||
}
|
||||
|
||||
std::ofstream f;
|
||||
rewrite_filename(mine_outfile);
|
||||
f.open(mine_outfile.c_str(), std::ofstream::trunc);
|
||||
if (f.fail())
|
||||
log_error("Can't open output file `%s'.\n", mine_outfile.c_str());
|
||||
|
|
|
@ -951,10 +951,7 @@ struct TechmapPass : public Pass {
|
|||
size_t argidx;
|
||||
for (argidx = 1; argidx < args.size(); argidx++) {
|
||||
if (args[argidx] == "-map" && argidx+1 < args.size()) {
|
||||
if (args[argidx+1].substr(0, 2) == "+/")
|
||||
map_files.push_back(proc_share_dirname() + args[++argidx].substr(2));
|
||||
else
|
||||
map_files.push_back(args[++argidx]);
|
||||
map_files.push_back(args[++argidx]);
|
||||
continue;
|
||||
}
|
||||
if (args[argidx] == "-max_iter" && argidx+1 < args.size()) {
|
||||
|
@ -1005,6 +1002,7 @@ struct TechmapPass : public Pass {
|
|||
map->add(mod->clone());
|
||||
} else {
|
||||
std::ifstream f;
|
||||
rewrite_filename(fn);
|
||||
f.open(fn.c_str());
|
||||
if (f.fail())
|
||||
log_cmd_error("Can't open map file `%s'\n", fn.c_str());
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue