mirror of
https://github.com/YosysHQ/yosys
synced 2025-05-08 08:15:48 +00:00
gzip: simplify uncompressed interface
This commit is contained in:
parent
218ec3fc05
commit
d00259081d
4 changed files with 18 additions and 23 deletions
|
@ -469,14 +469,8 @@ void Frontend::extra_args(std::istream *&f, std::string &filename, std::vector<s
|
|||
next_args.insert(next_args.end(), args.begin(), args.begin()+argidx);
|
||||
next_args.insert(next_args.end(), filenames.begin()+1, filenames.end());
|
||||
}
|
||||
std::ifstream *ff = new std::ifstream;
|
||||
ff->open(filename.c_str(), bin_input ? std::ifstream::binary : std::ifstream::in);
|
||||
yosys_input_files.insert(filename);
|
||||
if (ff->fail()) {
|
||||
delete ff;
|
||||
ff = nullptr;
|
||||
}
|
||||
f = uncompressed(ff, filename);
|
||||
f = &uncompressed(filename, bin_input ? std::ifstream::binary : std::ifstream::in);
|
||||
}
|
||||
if (f == NULL)
|
||||
log_cmd_error("Can't open input file `%s' for reading: %s\n", filename.c_str(), strerror(errno));
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue