summaryrefslogtreecommitdiff
path: root/backends/intersynth
diff options
context:
space:
mode:
authorClifford Wolf <clifford@clifford.at>2014-08-23 15:03:55 +0200
committerClifford Wolf <clifford@clifford.at>2014-08-23 15:03:55 +0200
commit19cff41eb4261b20374058f16807a229af46f304 (patch)
tree10cdd990dfbba21e7851127fca75de4c74cdd274 /backends/intersynth
parent5dce303a2a2c27d50e99856b6f33467798e13020 (diff)
Changed frontend-api from FILE to std::istream
Diffstat (limited to 'backends/intersynth')
-rw-r--r--backends/intersynth/intersynth.cc8
1 files changed, 4 insertions, 4 deletions
diff --git a/backends/intersynth/intersynth.cc b/backends/intersynth/intersynth.cc
index 97ead3c6..8502d90f 100644
--- a/backends/intersynth/intersynth.cc
+++ b/backends/intersynth/intersynth.cc
@@ -101,13 +101,13 @@ struct IntersynthBackend : public Backend {
log("Output filename: %s\n", filename.c_str());
for (auto filename : libfiles) {
- FILE *f = fopen(filename.c_str(), "rt");
- if (f == NULL)
+ std::ifstream f;
+ f.open(filename.c_str());
+ if (f.fail())
log_error("Can't open lib file `%s'.\n", filename.c_str());
RTLIL::Design *lib = new RTLIL::Design;
- Frontend::frontend_call(lib, f, filename, (filename.size() > 3 && filename.substr(filename.size()-3) == ".il") ? "ilang" : "verilog");
+ Frontend::frontend_call(lib, &f, filename, (filename.size() > 3 && filename.substr(filename.size()-3) == ".il") ? "ilang" : "verilog");
libs.push_back(lib);
- fclose(f);
}
if (libs.size() > 0)